package designer.observer.impl;

import designer.observer.inter.IObserver;
import designer.observer.inter.ISubject;

/**
 * 第二个观察者的目标
 * Created by tanlee on 2016/4/19.
 */
public class Observer2 implements IObserver {

    private ISubject subject;

    public Observer2(ISubject subject) {
        this.subject = subject;
        subject.registerObserver(this);
    }

    @Override
    public void update(String msg) {
        System.out.println("第二个订阅者 得到 " + msg + "决定不去拼一枪");
    }
}
